package com.ai.ly.goodsautocat.vo;

import com.alibaba.fastjson.JSONObject;

public class VaildResultVO implements Comparable<VaildResultVO>{

    public double C ;    // cost of constraints violation
    public double eps ; // stopping criteria
    public double trainningCorrectRate;
    public int numberOfTrainningSample;
    public int numberOfTrainningCorrect;
    
    public double testCorrectRate;
    public int numberOfTestSample;
    public int numberOfTestCorrect;
    
    public String toString() {
        return JSONObject.toJSONString(this);
    }

    @Override
    public int compareTo(VaildResultVO o) {
        if (o.trainningCorrectRate>this.trainningCorrectRate) {
            return 1;
        }else if (o.trainningCorrectRate==this.trainningCorrectRate) {
            return 0;
        }else {
            return -1;
        }
    }
}
